package xyz.jangle.service.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import xyz.jangle.dao.BsFileBitMapper;
import xyz.jangle.model.BsFileBit;
import xyz.jangle.service.BsFileBitService;
import xyz.jangle.utils.JConstant;

@Service
public class BsFileBitServiceImpl implements BsFileBitService {
	
	@Autowired
	BsFileBitMapper bsFileBitMapper;
	@Override
	public Map<String, Object> selectByPrimaryKey(BsFileBit record) {
		Map<String, Object> map = new HashMap<String, Object>();
		BsFileBit bsFileBit = bsFileBitMapper.selectByPrimaryKey(record.getId());
		map.put("model", bsFileBit);
		map.put("code", JConstant.SUCCESS_CODE);
		return map;
	}

	@Override
	public Map<String, Object> insert(BsFileBit record) {
		Map<String, Object> map = new HashMap<String, Object>();
		bsFileBitMapper.insert(record);
		map.put("model", record);
		map.put("code", JConstant.SUCCESS_CODE);
		map.put("message", JConstant.SUCCESS_MESSAGE);
		return map;
	}


	

}
